/** * Generate a virtual coupon when order is completed. * * @param int $order_id Order ID. */ function acfwp_create_virtual_coupon( $order_id ) { $order = wc_get_order( $order_id ); $customer_id = $order->get_customer_id(); $create_date = date( ‘Y-m-d H:i:s’, current_time(‘timestamp’)); $expire_date = date(…Continue reading
/*********************************************************************************** * WooCommerce Wholesale Lead Capture Re-send Email Button in User Profile * *********************************************************************************/ function wwlc_add_resend_email_button() { if ( ! is_plugin_active( ‘woocommerce-wholesale-lead-capture/woocommerce-wholesale-lead-capture.bootstrap.php’ ) ) { return; } ?> Re-send wholesale lead email Wholesale application receivedWholesale account approvedWholesale account rejected Send…Continue reading
/** * Insert template at the bottom of the mobile menu. */ add_action( ‘wpex_hook_mobile_menu_bottom’, function() { echo do_shortcode( ‘[wpex_template id=”YOUR_TEMPLATE_ID”]’ ); } );Continue reading
//* Genesis Enable the block-based widget editor add_filter( ‘use_widgets_block_editor’, ‘__return_true’ );Continue reading
/** * Custom shortcode to display WPForms form entries in table view * * Basic usage: [wpforms_entries_table id=”FORMID”] * * @link https://wpforms.com/developers/how-to-display-form-entries/ * * For support, please visit: https://www.facebook.com/groups/wpformsvip */ function wpf_entries_table( $atts ) { // Pull ID shortcode attributes.…Continue reading
/** * Add field values for dropdown, checkboxes, and multiple choice fields * * @link https://wpforms.com/developers/add-field-values-for-dropdown-checkboxes-and-multiple-choice-fields/ * * For support, please visit: https://www.facebook.com/groups/wpformsvip */ add_filter( ‘wpforms_fields_show_options_setting’, ‘__return_true’ );Continue reading
/** * Defer the reCAPTCHA script until after the page loads * * @link https://wpforms.com/developers/how-to-defer-the-recaptcha-script/ * * For support, please visit: https://www.facebook.com/groups/wpformsvip */ function wpf_recaptcha_add_async_defer( $tag, $handle ) { if ( strpos( $tag, ‘recaptcha/api.js?onload=wpformsRecaptchaLoad’ ) !== false ) { $tag…Continue reading