Merge pull request #32973 from woocommerce/fix/32956-notice-on-empty-product-page
Fix notice on empty product page
This commit is contained in:
commit
eb5ef8dfc6
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: fix
|
||||||
|
|
||||||
|
Fix notice on emptry product page
|
|
@ -158,8 +158,7 @@ class Products extends Task {
|
||||||
* @param string $hook Page hook.
|
* @param string $hook Page hook.
|
||||||
*/
|
*/
|
||||||
public function possibly_add_load_sample_return_notice_script( $hook ) {
|
public function possibly_add_load_sample_return_notice_script( $hook ) {
|
||||||
global $post;
|
if ( 'edit.php' !== $hook || 'product' !== get_query_var( 'post_type' ) ) {
|
||||||
if ( 'edit.php' !== $hook || 'product' !== $post->post_type ) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue