Woocommerce custom checkout form

You can overwrite woocommerce templates placing them in your theme. To overwrite e.g. form-billing.php template, place it in yourtheme/woocommerce/checkout/form-billing.php directory. You can also add filter to overwrite form field rendering function. Or even overwrite whole function. To add new fields refer to WooCommerce documentation. I’m pasting code from documentation for adding fields to not leave … Read more

WP_Query multiple post results

Your loop is wrong, you should not use to foreach inside the while, simply add the classic the_post () using the variable of your loop in this case $ loop for example <?php $args = array( ‘post_type’ => ‘product’, ‘stock’ => 1, ‘posts_per_page’ => 9, ‘product_cat’ => $pagename, ); $loop = new WP_Query( $args ); … Read more

Custom Plugin Options Won’t Update

Did you confirm it was the transient values causing the options to not update? Here’s the WordPress function to clear transient values: https://codex.wordpress.org/Function_Reference/delete_transient An example: <?php // Create a simple function to delete our transient function edit_term_delete_transient() { delete_transient( ‘the_transient_name_to_delete’ ); } // Add the function to the edit_term hook so it runs when categories/tags … Read more

Add to cart – button should be disabled

This behavior is being applied by your theme’s javascript. There’s a global variable being set in the head of the page by the theme: <script type=”text/javascript”> /* <![CDATA[ */ var edgeGlobalVars = {“vars”:{“edgeAddForAdminBar”:0,”edgeElementAppearAmount”:-100,”edgeAddingToCartLabel”:”Adding to Cart…”,”edgeTopBarHeight”:0,”edgeStickyHeaderHeight”:0,”edgeStickyHeaderTransparencyHeight”:60,”edgeLogoAreaHeight”:0,”edgeMenuAreaHeight”:96,”edgeMobileHeaderHeight”:60}}; var edgePerPageVars = {“vars”:{“edgeStickyScrollAmount”:0,”edgeHeaderTransparencyHeight”:0}}; /* ]]> */ </script> and a call to a minified/aggregate compiled theme js file: <script type=”text/javascript” … Read more