if( is_admin() ){ remove_action( ‘admin_color_scheme_picker’, ‘admin_color_scheme_picker’ ); add_action( ‘personal_options’, ‘prefix_hide_personal_options’ ); } function prefix_hide_personal_options() { ?>Continue reading
function remove_link_from_admin_bar_7( $wp_admin_bar ) { $wp_admin_bar->remove_node( ‘wpcode-admin-bar-info’ ); } add_action( ‘admin_bar_menu’, ‘remove_link_from_admin_bar_7’, 999 );Continue reading
add_filter( ‘woocommerce_cheque_process_payment_order_status’, ‘change_cheque_order_status’, 9999, 2 ); function change_cheque_order_status( $status, $order ) { return ‘pending’; }Continue reading
function copy_desc_to_short_desc( $product_id ) { try { // Get the product $product = wc_get_product( $product_id ); // Check if product is valid if ( $product ) { // Get the main description $description = $product->get_description(); // Check if the main…Continue reading
/** * @snippet Hide Private Products @ WooCommerce Frontend * @how-to Get CustomizeWoo.com FREE * @author Rodolfo Melogli * @compatible WooCommerce 8 * @community https://businessbloomer.com/club/ */ add_filter( ‘posts_where’, ‘bbloomer_no_private_products_posts_frontend_administrator’ ); function bbloomer_no_private_products_posts_frontend_administrator( $where ) { if ( is_admin() ) return…Continue reading
/** * @snippet Hide Private Products @ WooCommerce Frontend * @how-to Get CustomizeWoo.com FREE * @author Rodolfo Melogli * @compatible WooCommerce 8 * @community https://businessbloomer.com/club/ */ add_filter( ‘posts_where’, ‘bbloomer_no_private_products_posts_frontend_administrator’ ); function bbloomer_no_private_products_posts_frontend_administrator( $where ) { if ( is_admin() ) return…Continue reading
// // minimum order amount for checkout // // add_action(‘woocommerce_checkout_process’, ‘wc_minimum_order_amount’); add_action(‘woocommerce_before_cart’ , ‘wc_minimum_order_amount’); function wc_minimum_order_amount() { $minimum = 200; $cart_total = WC()->cart->total; $shipping_total = WC()->cart->get_shipping_total(); if (($cart_total – $shipping_total) < $minimum) { if (is_cart()) { wc_print_notice( sprintf('Your current order…Continue reading
// // minimum order amount for checkout // // add_action(‘woocommerce_checkout_process’, ‘wc_minimum_order_amount’); add_action(‘woocommerce_before_cart’ , ‘wc_minimum_order_amount’); function wc_minimum_order_amount() { $minimum = 200; $cart_total = WC()->cart->total; $shipping_total = WC()->cart->get_shipping_total(); if (($cart_total – $shipping_total) < $minimum) { if (is_cart()) { wc_print_notice( sprintf('Your current order…Continue reading
add_action( ‘woocommerce_before_single_product’, ‘custom_check_variations_stock_status’ ); function custom_check_variations_stock_status() { global $product; if ( $product->is_type( ‘variable’ ) ) { $variations = $product->get_available_variations(); $all_out_of_stock = true; foreach ( $variations as $variation ) { if ( $variation[‘is_in_stock’] ) { $all_out_of_stock = false; break; } }…Continue reading
function fn_currentyear () { $year = date_i18n (‘Y’); return $year; } add_shortcode (‘currentyear’, ‘fn_currentyear’);Continue reading