Set fixed eot for users as they sign up

I want to have it so that when any user signs up to our site they expire on 12-31. If they signup before november then they expire this year. if they signup in November or December they expire on 12/31 of the next year.

example
Sign up on 6/1/2018 membership expires on 12/31/2018
sign up on 10/1/2018 membership expires on 12/13/2018
sign up on 11/30/2018 membership expires on 12/31/2019

This is the code I’ve put together from other questions:

add_action ("ws_plugin__s2member_during_configure_user_registration_front_side", "my_fixed_EOT_time");
function my_fixed_EOT_time ($vars)
      {
       $actualmonth = date('n');
	$actualyear = date('Y');
	if ($actualmonth > '10'){
		$actualyear = date('Y', strtotime('+1 year'));
	}
       $expire_on = strtotime($actualyear . '-12-31');
       update_user_option ($vars["user_id"], "s2member_auto_eot_time", $expire_on);
}

(this is in my theme’s functions.php)
When I test the code it shows the right dates, but in use it’s not setting EOT when people renew their accounts. Is there something I’ve done wrong? Maybe this hook only fires on new registrations?

This is the shortcode i’m using for the signup button:

[s2Member-PayPal-Button level="2" ccaps="" desc="Active Member / $45 Until October 1st." ps="ocra" lc="" cc="USD" dg="0" ns="1" custom="myurl(redacted)" ta="0" tp="0" tt="Y" ra="45" rp="1" rt="Y" rr="BN" rrt="" rra="1" image="default" output="button" /]

Recurring memberships has no EOT - it depends of when they signup and the settings of the button they use. So the payment gateway sets it, no s2M. Thus it is deleted at next payment (which is an action at the payment gateway, not at the site).

i would like to fix that. How can i make it so that when they use this button to sign up / or re-sign up, the code i created is in-acted and the eot is placed on their account?

You should use “modify” button/form, this way old EOT at the payment processor will be deleted and new EOT (there again) will be created, so they will have a new subscription, basically. But EOT still will be hidden, as it id not handled at the site, but at the payment processor. Maybe you can build your calculation, based at the button/form settings, and to save it in admin profile for future use, but anyway the payment processor will do the real math and will act by it, not by your number.