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 | |
| add_action( 'wfacp_before_process_checkout_template_loader', function () { | |
| add_action( 'woocommerce_checkout_process', function () { | |
| $instance = WFACP_Core()->template_loader->get_template_ins(); | |
| remove_filter( 'woocommerce_checkout_posted_data', [ $instance, 'assign_email_as_a_username' ] ); | |
| } ); | |
| } ); |
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
| add_filter( 'wfacp_percentage_number_format', 'change_number_format' ); | |
| function change_number_format( $percentage ) { | |
| return number_format( $percentage, 0 ); | |
| } |
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 | |
| add_action( 'wp_ajax_nopriv_wfacp_custom_create_account', 'wfacp_custom_create_account' ); | |
| function wfacp_custom_create_account() { | |
| WFACP_AJAX_Controller::check_nonce(); | |
| $resp = [ | |
| 'msg' => '', | |
| 'status' => false, | |
| ]; | |
| if ( isset( $_POST['data'] ) ) { |
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
| add_filter( 'gettext', 'woocommerce_rename_coupon_message_on_checkout' ,10,3); | |
| // rename the coupon field on the checkout page | |
| function woocommerce_rename_coupon_message_on_checkout( $translated_text, $text, $text_domain ) { | |
| // bail if not modifying frontend woocommerce text | |
| if ( is_admin() || 'woocommerce' !== $text_domain ) { | |
| return $translated_text; | |
| } elseif ( 'Apply coupon' === $text ) { | |
| $translated_text = 'Special Code'; | |
| } |
NewerOlder