delete cart item from the carts when user login from other system
delete cart item from the carts when user login from other system
delete cart item from the carts when user login from other system
Use this code.. $downloads = $product->get_files(); $product_id = $product->id; foreach( $downloads as $key => $each_download ) { $query = “SELECT SUM( download_count ) AS count FROM {$wpdb->prefix}woocommerce_downloadable_product_permissions WHERE product_id = $product->id”; $count = $wpdb->get_var( $query ); if ( ! empty( $count ) ) { echo ‘<a href=”‘.$each_download[“file”].'”>Download (‘.$count.’)</a>’; } else { echo ‘<a href=”‘.$each_download[“file”].'”>Download</a>’; } … Read more
You can overwrite woocommerce templates placing them in your theme. To overwrite e.g. email-order-details.php template, place it in yourtheme/woocommerce/email/email-order-details.php path. You can also add action to add your custom review button. function wpse_287685_woocommerce_email_after_order_table($order, $sent_to_admin, $plain_text, $email) { ?> <a href=”#”>Add review</a> <?php } add_action( ‘woocommerce_email_after_order_table’, ‘wpse_287685_woocommerce_email_after_order_table’, 10, 4 );
date_created is read-only value meaning that you cannot set it over the REST API. What you can do is: Send creation time from your “external system” as order meta data (sample PHP code below) and then in WooCommerce trigger the action using custom plug-in which updates order date_created according to a meta value. $json_encode[‘meta_data’][0][‘key’] = … Read more
You can modify the admin navigation using the $menu global var. The following will accomplish what you’re after add_action( ‘admin_menu’, ‘my_plugin_edit_admin_menu’); function my_plugin_edit_admin_menu() { global $menu, $submenu; foreach ($menu as $menuKey => $menuItem) if ($menuItem[0] == ‘Products’) $menu[$menuKey][2] = ‘https://google.com/’; // wtv link you want // UPDATE: // remove the sub menu as well (note … Read more
Adding this code below has fixed the issue .woocommerce-billing-fields__field- wrapper:after { clear: both; display: table; content: ”; } Thanks
Hook woocommerce price in backend order edition
Issues like this may be caused by either a conflict with your theme or with another plugin. You can read more about plugin and theme conflicts in the documentation here: https://docs.woocommerce.com/document/woocommerce-self-service-guide/ The best way to determine if the issue is being caused by a theme and/or plugin is to do the following: Temporarily switch your … Read more
Just add redux global variable between funtion add_filter (‘add_to_cart_redirect’, ‘redirect_to_checkout’); function redirect_to_checkout() { global $xpanel; if ( isset( $xpanel[‘woo-option’] ) && $xpanel[‘woo-option’] == TRUE ) { global $woocommerce; $checkout_url = $woocommerce->cart->get_checkout_url(); return $checkout_url; } }
this is not currently possible with a product variation as you have found but bundle and composite products do have the ability to add variables inside https://woocommerce.com/products/product-bundles/ pick and mix bundles may be your answer