How to change the text of Publish Button

You can use the following code to change Publish button’s text to Save even after editing Post Status. Do not forget: Clicking OK or Cancel buttons when editing Post Status will change Publish button’s text. This happens also when editing Post Visibility and Publish time. I used setTimeout() to postpone changing Publish button’s text after … Read more

Remove Gutenberg Buttons Block

This added to the functions.php allows the removal of specific Gutenberg blocks. function hide_default_blocks($allowed_block) { $blocks = WP_Block_Type_Registry::get_instance()->get_all_registered(); unset($blocks[‘core/buttons’]); return array_keys($blocks); } add_filter(‘allowed_block_types_all’, ‘hide_default_blocks’); Part of the issue is that it is core/buttons and not core/button but also the method of removal was incorrect.

Add a custom code with custom link after add to cart for every product

You need to add custom meta box such as product_ext_url for product post type. Then use hook below to add your code in single product page. add_action( ‘woocommerce_after_add_to_cart_button’, ‘your_function’ ); function your_function(){ echo get_post_meta( $product_id, ‘product_ext_url’ ); } In above function you will print external url of current product after add-to-cart button. // UPDATE To … Read more