Woocommerce posts and products links works only once and then get 404 error

I realized that some php code changes the content of .htaccess file. The php folder was in a directory named ‘securityl’. I’ve been removed that directory but whenever the website was refreshing the directory and also the php files inside it was recreating. In the end I discovered that some code in wp-include/load.php is creating … Read more

How to make phone number become whatsapp link in back-end order details woocommerce

add_action( ‘admin_footer’, function() { if ( get_current_screen()->post_type == ‘shop_order’ ) { ?> <script> jQuery( function($) { function tel_to_wa() { var wa=”//wa.me/51″; var tel = $( ‘a[href*=”tel:”]’); tel.attr({ href: wa + tel.text(), target: ‘_blank’ }); } tel_to_wa(); $( ‘.order-preview’ ).click( function() { $(document).ajaxComplete( tel_to_wa ); }); }); </script> <?php } });

Add sale count next to star rating in woocommerce single product page

For single product page, I tested it with the themes: ShoppingCart and Storefront and it works fine : in function.php: function shoppingcart_setup(){ add_filter(‘woocommerce_short_description’, function(){ global $product; $units_sold = $product->get_total_sales(); if ( $units_sold ) return ‘<p>’ . sprintf( __( ‘Sold: %s’, ‘woocommerce’ ), $units_sold ) . ‘</p>’; }, 10, 2); } add_action( ‘after_setup_theme’, ‘shoppingcart_setup’ ); Note: … Read more