Add WooCommerce upsells below the add-to-cart button
// add upsells below add-to-cart button add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_upsell_display’, 40 );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
// add upsells below add-to-cart button add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_upsell_display’, 40 );Continue reading
/** * Skip empty page breaks if the condition is not met * * @link https://wpforms.com/developers/how-to-skip-page-breaks-when-using-conditional-logic/ * * For support, please visit: https://www.facebook.com/groups/wpformsvip */ function wpf_dev_skip_empty_pages() { ?>Continue reading
/** * Customize name field properties. * * @link https://wpforms.com/developers/how-to-change-sublabels-for-the-name-field/ * * For support, please visit: https://www.facebook.com/groups/wpformsvip */ function wpf_dev_name_field_properties( $properties, $field, $form_data ) { // Change the text for the sublabel $properties[ ‘inputs’ ][ ‘first’ ][ ‘sublabel’ ][ ‘value’…Continue reading
/** * Customize email field properties. * * @link https://wpforms.com/developers/how-to-change-sublabels-for-the-email-field/ * * For support, please visit: https://www.facebook.com/groups/wpformsvip */ function wpf_dev_email_field_properties( $properties, $field, $form_data ) { // Change the text for the sublabel $properties[ ‘inputs’ ][ ‘primary’ ][ ‘sublabel’ ][ ‘value’…Continue reading
/** * Customize Stripe credit card field properties. * * @link https://wpforms.com/developers/how-to-change-sublabels-for-the-credit-card-field * * For support, please visit: https://www.facebook.com/groups/wpformsvip */ function wpf_dev_creditcard_field_properties( $properties, $field, $form_data ) { // Change sub-label text on the Card Number field $properties[ ‘inputs’ ][ ‘number’…Continue reading
/** * Shortcode that displays the number of completed entries for a form. * * Usage: [wpforms_entry_total form_id=”X”] – X is the form ID. * * @link https://wpforms.com/developers/display-entry-submissions-count-for-a-specific-form/ */ function wpf_dev_form_entry_total( $atts ) { $args = shortcode_atts( array( ‘form_id’ =>…Continue reading
function wpb_list_child_pages() { global $post; // Only get child pages of the current page $args = array( ‘post_type’ => ‘page’, ‘posts_per_page’ => -1, // get all child pages ‘post_parent’ => $post->ID, ‘orderby’ => ‘menu_order’, ‘order’ => ‘ASC’ ); $child_pages =…Continue reading
echo ‘test’;Continue reading
/** * WPForms Add new address field scheme (Canada) * * @link https://wpforms.com/developers/create-additional-schemes-for-the-address-field/ * * For support, please visit: https://www.facebook.com/groups/wpformsvip */ function wpf_dev_new_address_scheme( $schemes ) { $schemes[ ‘canada’ ] = array( ‘label’ => ‘Canada’, ‘address1_label’ => ‘Address Line 1’, ‘address2_label’…Continue reading
/** * @link https://library.wpcode.com/snippet/924r645g/ */ add_filter( ‘simpay_get_customer_args_from_payment_form_request’, /** * @param array $customer_args Arguments for Customer. * @param \SimplePay\Core\Abstracts\Form $form Form instance. * @param array $deprecated Empty array. * @param array $form_values Values of named fields in the payment form. *…Continue reading