Created
June 26, 2018 14:42
-
-
Save kreamweb/a3ac8e255722e324282136afee8f75e3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( function_exists( 'ywsbs_get_subscription' ) ) { | |
add_action( 'ywsbs_renew_subscription', 'ywsbs_renew_subscription_additional_fields', 10, 2 ); | |
function ywsbs_renew_subscription_additional_fields( $renew_order_id, $subscription_id ) { | |
$subscription = ywsbs_get_subscription( $subscription_id ); | |
$order_id = $subscription->order_id; | |
$billing_persontype = get_post_meta( $order_id, '_billing_persontype', true ); | |
$billing_cpf = get_post_meta( $order_id, '_billing_cpf', true ); | |
update_post_meta( $renew_order_id, '_billing_persontype', $billing_persontype ); | |
update_post_meta( $renew_order_id, '_billing_cpf', $billing_cpf ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment