MemberPress: Auto-populate coupon on all registration forms
function mepr_auto_populate_coupon() { ?>Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
function mepr_auto_populate_coupon() { ?>Continue reading
function auto_click_have_coupon_link() { ?>Continue reading
// See [Using only ID in product url in WooCommerce?](https://stackoverflow.com/a/70457452) add_action(‘save_post_product’, ‘incontrol_set_product_title’, 10, 3); function incontrol_set_product_title ($post_id){ // This temporarily removes action to prevent infinite loops remove_action(‘save_post_product’, ‘incontrol_set_product_title’); // Update title wp_update_post(array( ‘ID’ => $post_id, ‘post_name’ => $post_id // WordPress…Continue reading
// See [Using only ID in product url in WooCommerce?](https://stackoverflow.com/a/70457452) add_action(‘save_post_product’, ‘incontrol_set_product_title’, 10, 3); function incontrol_set_product_title ($post_id){ // This temporarily removes action to prevent infinite loops remove_action(‘save_post_product’, ‘incontrol_set_product_title’); // Update title wp_update_post(array( ‘ID’ => $post_id, ‘post_name’ => $post_id // WordPress…Continue reading
/** * Create a secondary admin toolbar in the top right with integrated plugin/users search * * @author mccannex * * Changelog * 2024-08-01 – Fixed issue with crashing admin backend because WP core changed priority on certain hooks *…Continue reading
do_action( ‘qm/debug’, ‘[EventHelpers] Registering’ ); function current_events_filter($data) { // Get current time in GMT $now = new \DateTime(‘now’); $now->setTime(0, 0); $filtered = array_filter($data, function($element) use ($now) { if(isset($element->post_date)) { $post_date = new \DateTime($element->post_date); $post_date->setTime(0, 0); if($post_date >= $now) { return…Continue reading
do_action( ‘qm/debug’, ‘[StudioHelpers] Registering’ ); function corrugated_studios_query($query) { $query->set(‘meta_query’, array( array( ‘key’ => ‘visible’, ‘value’ => 1, ‘compare’ => ‘=’ ) )); $query->set(‘post_type’, ‘corrugated-studio’); $query->set(‘order’, ‘ASC’); $query->set(‘orderby’, ‘title’); } add_action(‘elementor/query/queryCorrugatedStudios’, ‘corrugated_studios_query’); do_action( ‘qm/debug’, ‘[StudioHelpers] Registered’ );Continue reading
add_action( ‘wp_before_admin_bar_render’, function () { global $wp_admin_bar; $wp_admin_bar->remove_menu( ‘wp-logo’ ); }, 0 );Continue reading