Error with get_price (and others) in self-written plugin to show price

The error Is coming from the file: /wp-content/plugins/woocommerce-display-various/display_various.php Line 180. Disable the plugin ‘woocommerce-display-various’ and check if the problem still exists. Your code Why are you using output buffering (ob_start())? Furthermore you’re not using it correctly. There’s alot to improve on your code… See my changes: add_action(‘init’,’add_custom_price_shortcodes’); function add_custom_price_shortcodes() { if ( class_exists( ‘woocommerce’ ) … Read more

How to add custom post widgets as tags into wordpress

Please check ACF https://www.advancedcustomfields.com/ Create new text field for title https://www.advancedcustomfields.com/resources/text/ Create new file or text field for file https://www.advancedcustomfields.com/resources/file/ You can also check link field https://www.advancedcustomfields.com/resources/link/ Adding fields to Posts When you add new field group you can set position to ‘Side’.

Pass CF7 form data to plugin

A complete answer would be a little complicated since ‘plugin A’ and ‘plugin B’ should be analized in-depth so check for available hooks and filters, but if I understand you wrote your own plugin so you have full control on it. That said, a starting point to get submitted data from CF7 is the following: … Read more

Preventing double loading JS scripts (like React) when developing for Gutenberg

Any WordPress-packaged scripts enqueued properly via wp_enqueue_script won’t load multiple times. If two different plugins rely on the same dependencies, thanks to the enqueue logic, those dependencies will only be loaded once. create-guten-block only contains javascript relevant to the custom block itself, and sets wp-blocks, wp-i18n, and wp-element (the abstraction layer WP uses on top … Read more

add seperate suffix for low price and high price in woocommerce

You cloud use the filter “woocommerce_format_price_range” from the “wc_format_price_range” function to modifed the price. A small example: function my_function_to_change_the_price_formating($price) { // If you look in the function wc_format_price_range, you will see that the two prices are separated by a dash. (–) // We used this “dash” and separate the two prices. $tmp = explode(‘–’, $price); … Read more