Change the “Add to Cart” Button Text

/** * Change the “Add to Cart” button text globally. * Change ‘Buy Now’ to your desired text. */ function custom_woocommerce_product_add_to_cart_text( $text, $product ) { switch ( $product->get_type() ) { case ‘external’: return ‘View Product’; // Or ‘Buy from Vendor’…Continue reading

DIRSYNC – Lifter Courses (copy)

/** * LifterLMS Content Sync Engine – Comprehensive Data Version * Syncs courses and lessons with ALL related content * WPCode Snippet – Run Everywhere – Priority 20 */ defined( ‘ABSPATH’ ) || exit; // Add manual sync button in…Continue reading

Show Product Categories in the Vendor Product Catalog

add_action( ‘woocommerce_shop_loop_item_title’, ‘add_category_above_product_title’, 6 ); function add_category_above_product_title() { global $product; $current_post_id = isset( $GLOBALS[‘wp_query’]->queried_object_id ) ? $GLOBALS[‘wp_query’]->queried_object_id : 0; if ( ! $current_post_id ) { return; } $post_content = get_post_field( ‘post_content’, $current_post_id ); if ( strpos( $post_content, ‘[wcv_products’ ) ===…Continue reading

LIFTER – Course to Module

/** * LifterLMS Text Replacement Snippet – VERIFIED VERSION * Changes “Courses” to “Modules” and “Lessons” to “Steps” * Add to WP Code Snippets or functions.php * Run everywhere (Frontend & Admin) * * Based on official LifterLMS documentation and…Continue reading

LIFTER – Course to Module

/** * LifterLMS Text Replacement Snippet – VERIFIED VERSION * Changes “Courses” to “Modules” and “Lessons” to “Steps” * Add to WP Code Snippets or functions.php * Run everywhere (Frontend & Admin) * * Based on official LifterLMS documentation and…Continue reading

SYNC – Gravity Forms, Fields

/** * WPCode Snippet: Gravity Forms & Feeds Sync Engine * Description: Manual sync functionality for forms and their feeds * Location: Run Everywhere * Priority: 20 */ defined( ‘ABSPATH’ ) || exit; // Add a manual test button in…Continue reading

HTML versnellen

/** * Pixelsz – Cache-busting voor herhaalbezoeken * – Voegt ?v=TIMESTAMP toe aan media (ook srcset) * – Optioneel: ook aan lokale CSS/JS * – Verwijdert oude ?ver / ?v om dubbele versies te voorkomen */ /** Helper: haal een…Continue reading

Gravity Form Custom Code

/* ————————————————————————- * * Gravity Form Custom Theme /* ————————————————————————- */ add_filter( ‘gform_default_styles’, function( $styles ) { return ‘{“theme”:””,”inputSize”:”lg”,”inputBorderRadius”:”5″,”inputBorderColor”:”#000″,”inputBackgroundColor”:”#fff”,”inputColor”:”#000″,”inputPrimaryColor”:”#000″,”labelFontSize”:”18″,”labelColor”:”#000″,”descriptionFontSize”:”14″,”descriptionColor”:”#000″,”buttonPrimaryBackgroundColor”:”#4B533D”,”buttonPrimaryColor”:”#fff”}’; } );Continue reading

Populate Work Order Assign To Dropdown

/** * Name: frs_populateUserDropdown * Description: Populates the Assign To user dropdown with users from the same group as the current user * * Return: $values structure * **/ add_filter(‘frm_setup_new_fields_vars’, ‘frs_populateUserDropdown’, 20, 2); add_filter(‘frm_setup_edit_fields_vars’, ‘frs_populateUserDropdown’, 20, 2); function frs_populateUserDropdown( $values,…Continue reading