{status}_{post_type} does not run correctly?

WooCommerce has its own hooks for things like this. You shouldn’t rely on the underlying WordPress post-related hooks and functions when dealing with products and orders. WooCommerce is moving towards using custom database tables for products and orders instead of custom post types and while there’ll be hooks etc. added for backwards compatibility, you’ll be … Read more

Add suffix to price html does not work

I don’t think the filter will work in your template, since you’re using wc_price( wc_get_price_including_tax( $product ) ) .. a possible workaround: function pr_price_suffix( $price, $product ) { return wc_price( wc_get_price_including_tax( $product ) ). ‘ test’; } add_filter( ‘woocommerce_get_price_html’, ‘pr_price_suffix’, 10, 2 ); and in your single-product.php template: <?php echo $product->get_price_html(); ?>

OOP development and hooks

Sally CJ raises a good point in their comment that it is probably better to have each class initialize its own actions and filters. I’ve been working with the same boiler plate for some time now and created my own version of this boiler plate on GitHub. In that version I have a Back\Hooks and … Read more

Hook into all password resets in WordPress and get password before hashing?

Use the password_reset hook. function wpse_password_reset( $user, $new_pass ) { //* Do something useful with $new_pass } add_action( ‘password_reset’, ‘wpse_password_reset’, 10, 2 ); Edited to add after the comment: Looks like the reason I can’t use that is that the plugin uses wp_update_user to set the new password. Is there any way I can intercept … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)