nomi416
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Restroct product availabilityYou need the hook
"woocommerce_checkout_order_processed"
in order to check this when the user clicks “Place Order”. You can remove products then.// Untested Code add_action( 'woocommerce_checkout_order_processed', 'check_products', 1, 2 ); function check_products( $order_id, $posted_data ){ $postcodes = array (123, 789); $product_to_remove = array (05,989); if(isset($posted_data['shipping_postcode']) && in_array($posted_data['shipping_postcode'],$postcodes)){ foreach( WC()->cart->cart_contents as $prod_in_cart ) { // Get the Variation or Product ID $prod_id = ( isset( $prod_in_cart['variation_id'] ) && $prod_in_cart['variation_id'] != 0 ) ? $prod_in_cart['variation_id'] : $prod_in_cart['product_id']; $_product = wc_get_product( $prod_id ); // Check to see if IDs match if( in_array($prod_id,$product_to_remove) ) { // Get it's unique ID within the Cart $prod_unique_id = WC()->cart->generate_cart_id( $prod_id ); wc_add_notice( sprintf( __( '%s has been removed from your cart because it can no longer be purchased. Please contact us if you need assistance.', 'woocommerce' ), $_product->get_title() ), 'error' ); // Remove it from the cart by un-setting it unset( WC()->cart->cart_contents[$prod_unique_id] ); } } } }
Forum: Plugins
In reply to: [WooCommerce] Translating ONE word.This is not Woocommerce related question. Breadcrumbs are handled in theme or with some plugin maybe.
I see you are using “Zephyr” theme. You need to contact theme developers.
Or You can search theme files possibly “breadcrumbs.php”
Thanks
Forum: Plugins
In reply to: [Advanced Editor Tools] Where has the advanced link gone?Can you please tell where to add the code mention on configuration page?
Thanks
Forum: Plugins
In reply to: [Advanced Editor Tools] Advanced Link Dialog option gone in new versionOh. How can I add a class to link now? I am using TinyMCE Version 4.0.2. Please help.
Thanks
Forum: Plugins
In reply to: [Advanced Editor Tools] Advanced Link Dialog option gone in new versionOh. How can I add a class to link now? I am using TinyMCE Version 4.0.2. Please help.
Thanks
I am having a same issue. Except its on all mobile devices(android/iphone). Lighbox appears but on 30% of left side of screen.
Forum: Plugins
In reply to: [The Events Calendar] User submitted eventsThanks Barry!!!
Forum: Plugins
In reply to: [The Events Calendar] Sidebar Text Widget doesn't display on main events pageI am using this plugin “The Events Calendar Category Colors” along with The Events Calender. It was causing the problem. I deactivated it and it solved my problem. Thanks for your reply.
Forum: Plugins
In reply to: [The Events Calendar] Sidebar Text Widget doesn't display on main events pageMy problem is exactly opposite to yours. Sidebar widget for Upcoming events disappears on Single Event’s page. Its works just fine everywhere else.
Can’t seem to find solution.