Woocommerce cart functions
total prices of products in cart (with taxes): 127shipping costs: 12fees (taxable): 13discount from a coupon: 10 With these settings, I get the following on my cart object: "cart_contents_total":97.4998, "total":144.6,…
total prices of products in cart (with taxes): 127shipping costs: 12fees (taxable): 13discount from a coupon: 10 With these settings, I get the following on my cart object: "cart_contents_total":97.4998, "total":144.6,…
// Alter Product Pricing Part 1 - WooCommerce Product add_filter( 'woocommerce_get_price_html', 'bbloomer_alter_price_display', 9999, 2 ); function bbloomer_alter_price_display( $price_html, $product ) { // ONLY ON FRONTEND if ( is_admin() ) return…
We have to add this html code <video width="700" height="auto" autoplay loop controls muted playsinline> <source src="video.mp4" type="video/mp4" /> Your browser does not support the video tag. </video>
We have to add the bellow codes to function.php file of active theme. add_filter( 'woocommerce_cart_shipping_method_full_label', 'change_cart_shipping_method_full_label', 10, 2 ); function change_cart_shipping_method_full_label( $label, $method ) { $has_cost = 0 < $method->cost;…
I faced same issue. After debugging couples of hour I found that I linked jquery.mim.js in header.php. When I remove this then the coupon code and other functions of woocomerce…
BIO_new_file(“/etc/letsencrypt/live/domain.com/fullchain.pem”) failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen(‘/etc/letsencrypt/live/domain.com/fullchain.pem’,’r’) Solutions Find where the issue grep -R /etc/letsencrypt/live/example.com/fullchain.pem /etc/nginx/ 2. fix or reset them 3. sudo nginx -t 4. sudo systemctl…
Add this code to functions.php of theme // Hook for hide wp-loging add_action('init', 'prevent_wp_login'); function prevent_wp_login() { // WP tracks the current page - global the variable to access it…
Easy way to remove background of an image Online converter
$thumbnail = wp_get_attachment_image_url( $attachmentId, 'my-custom-size' ); $original = wp_get_attachment_image_url( $attachmentId, 'full' ); $square = wp_get_attachment_image_url( $attachmentId, [600, 600] ); $image_attributes = wp_get_attachment_image_src( $attachment_id = 8 ); if ( $image_attributes )…
Replace $product->get_stock_quantity() by $_product->get_stock_quantity(). function wcs_custom_get_availability( $availability, $_product ) { global $product; // Change In Stock Text if ( $_product->is_in_stock() ) { $availability['availability'] = __( 'Plenty available in our store!', 'woocommerce'); } //…