$this->get_hook_prefix(

$this->get_hook_prefix(

Appears in:
Hook Type: action

See hook in core

Displaying hooks found in version: woocommerce.11.0.0

do_action('$this->get_hook_prefix(') is found 22 times:

  • /includes/abstracts/abstract-wc-data.php line 438
    			}
    		}
    
    		if ( 'view' === $context ) {
    			$value = apply_filters( $this->get_hook_prefix() . $key, $value, $this );
    		}
    
    		return $value;
    	}
    
    	/**
    
  • /includes/abstracts/abstract-wc-data.php line 960
    		if ( array_key_exists( $prop, $this->data ) ) {
    			$value = array_key_exists( $prop, $this->changes ) ? $this->changes[ $prop ] : $this->data[ $prop ];
    
    			if ( 'view' === $context ) {
    				$value = apply_filters( $this->get_hook_prefix() . $prop, $value, $this );
    			}
    		}
    
    		return $value;
    	}
    
    
  • /includes/class-wc-customer.php line 541
    				 * @since 3.6.0
    				 * @param string      $value    The address property value.
    				 * @param WC_Customer $customer The customer object being read.
    				 */
    				$value = apply_filters( $this->get_hook_prefix() . $address_type . '_' . $prop, $value, $this );
    			}
    		}
    		return $value;
    	}
    
    	/**
    
  • /includes/class-wc-customer.php line 563
    			$changes = array_key_exists( $prop, $this->changes ) ? $this->changes[ $prop ] : array();
    			$value   = array_merge( $this->data[ $prop ], $changes );
    
    			if ( 'view' === $context ) {
    				$value = apply_filters( $this->get_hook_prefix() . $prop, $value, $this );
    			}
    		}
    
    		return $value;
    	}
    
    
  • /includes/class-wc-customer.php line 706
    			$changes = array_key_exists( $prop, $this->changes ) ? $this->changes[ $prop ] : array();
    			$value   = array_merge( $this->data[ $prop ], $changes );
    
    			if ( 'view' === $context ) {
    				$value = apply_filters( $this->get_hook_prefix() . $prop, $value, $this );
    			}
    		}
    
    		return $value;
    	}
    
    
  • /includes/class-wc-order.php line 655
    				 * @since 3.6.0
    				 * @param string   $value The address property value.
    				 * @param WC_Order $order The order object being read.
    				 */
    				$value = apply_filters( $this->get_hook_prefix() . $address_type . '_' . $prop, $value, $this );
    			}
    		}
    		return $value;
    	}
    
    	/**
    
  • /includes/class-wc-product-variation.php line 222
    		$value = $this->get_prop( 'sku', $context );
    
    		// Inherit value from parent.
    		if ( 'view' === $context && empty( $value ) ) {
    			$value = apply_filters( $this->get_hook_prefix() . 'sku', $this->parent_data['sku'], $this );
    		}
    		return $value;
    	}
    
    	/**
    	 * Returns the product's weight.
    
  • /includes/class-wc-product-variation.php line 238
    		$value = $this->get_prop( 'weight', $context );
    
    		// Inherit value from parent.
    		if ( 'view' === $context && empty( $value ) ) {
    			$value = apply_filters( $this->get_hook_prefix() . 'weight', $this->parent_data['weight'], $this );
    		}
    		return $value;
    	}
    
    	/**
    	 * Returns the product length.
    
  • /includes/class-wc-product-variation.php line 254
    		$value = $this->get_prop( 'length', $context );
    
    		// Inherit value from parent.
    		if ( 'view' === $context && empty( $value ) ) {
    			$value = apply_filters( $this->get_hook_prefix() . 'length', $this->parent_data['length'], $this );
    		}
    		return $value;
    	}
    
    	/**
    	 * Returns the product width.
    
  • /includes/class-wc-product-variation.php line 270
    		$value = $this->get_prop( 'width', $context );
    
    		// Inherit value from parent.
    		if ( 'view' === $context && empty( $value ) ) {
    			$value = apply_filters( $this->get_hook_prefix() . 'width', $this->parent_data['width'], $this );
    		}
    		return $value;
    	}
    
    	/**
    	 * Returns the product height.
    
  • /includes/class-wc-product-variation.php line 286
    		$value = $this->get_prop( 'height', $context );
    
    		// Inherit value from parent.
    		if ( 'view' === $context && empty( $value ) ) {
    			$value = apply_filters( $this->get_hook_prefix() . 'height', $this->parent_data['height'], $this );
    		}
    		return $value;
    	}
    
    	/**
    	 * Returns the tax class.
    
  • /includes/class-wc-product-variation.php line 310
    				$value = $this->parent_data['tax_class'];
    			}
    
    			if ( 'view' === $context ) {
    				$value = apply_filters( $this->get_hook_prefix() . 'tax_class', $value, $this );
    			}
    		}
    		return $value;
    	}
    
    	/**
    
  • /includes/class-wc-product-variation.php line 344
    		$value = $this->get_prop( 'stock_quantity', $context );
    
    		// Inherit value from parent.
    		if ( 'view' === $context && 'parent' === $this->get_manage_stock() ) {
    			$value = apply_filters( $this->get_hook_prefix() . 'stock_quantity', $this->parent_data['stock_quantity'], $this );
    		}
    		return $value;
    	}
    
    	/**
    	 * Get backorders.
    
  • /includes/class-wc-product-variation.php line 361
    		$value = $this->get_prop( 'backorders', $context );
    
    		// Inherit value from parent.
    		if ( 'view' === $context && 'parent' === $this->get_manage_stock() ) {
    			$value = apply_filters( $this->get_hook_prefix() . 'backorders', $this->parent_data['backorders'], $this );
    		}
    		return $value;
    	}
    
    	/**
    	 * Get main image ID.
    
  • /includes/class-wc-product-variation.php line 377
    	public function get_image_id( $context = 'view' ) {
    		$image_id = $this->get_prop( 'image_id', $context );
    
    		if ( 'view' === $context && ! $image_id ) {
    			$image_id = apply_filters( $this->get_hook_prefix() . 'image_id', $this->parent_data['image_id'], $this );
    		}
    
    		return $image_id;
    	}
    
    	/**
    
  • /includes/class-wc-product-variation.php line 395
    		$value = $this->get_prop( 'purchase_note', $context );
    
    		// Inherit value from parent.
    		if ( 'view' === $context && empty( $value ) ) {
    			$value = apply_filters( $this->get_hook_prefix() . 'purchase_note', $this->parent_data['purchase_note'], $this );
    		}
    		return $value;
    	}
    
    	/**
    	 * Get shipping class ID.
    
  • /includes/class-wc-product-variation.php line 411
    	public function get_shipping_class_id( $context = 'view' ) {
    		$shipping_class_id = $this->get_prop( 'shipping_class_id', $context );
    
    		if ( 'view' === $context && ! $shipping_class_id ) {
    			$shipping_class_id = apply_filters( $this->get_hook_prefix() . 'shipping_class_id', $this->parent_data['shipping_class_id'], $this );
    		}
    
    		return $shipping_class_id;
    	}
    
    	/**
    
  • /includes/class-wc-product-variation.php line 424
    	 * @param  string $context What the value is for. Valid values are view and edit.
    	 * @return string
    	 */
    	public function get_catalog_visibility( $context = 'view' ) {
    		return apply_filters( $this->get_hook_prefix() . 'catalog_visibility', $this->parent_data['catalog_visibility'], $this );
    	}
    
    	/**
    	 * Get attribute summary.
    	 *
    	 * By default, attribute summary contains comma-delimited 'attribute_name: attribute_value' pairs for all attributes.
    
  • /src/Internal/RestApi/Routes/V4/AbstractController.php line 107
    		 *
    		 * @param array $params The collection params.
    		 * @since 10.2.0
    		 */
    		return apply_filters( $this->get_hook_prefix() . 'collection_params', $params, $this );
    	}
    
    	/**
    	 * Get item schema, conforming to JSON Schema. Extended by routes.
    	 *
    	 * @return array The item schema.
    
  • /src/Internal/RestApi/Routes/V4/AbstractController.php line 125
    			 *
    			 * @param array $schema The item schema.
    			 * @since 10.2.0
    			 */
    			$this->schema = apply_filters( $this->get_hook_prefix() . 'item_schema', $this->add_additional_fields_schema( $this->get_schema() ) );
    		}
    		return $this->schema;
    	}
    
    	/**
    	 * Get the item response.
    
  • /src/Internal/RestApi/Routes/V4/AbstractController.php line 177
    		 * @param mixed           $item    WordPress representation of the item.
    		 * @param WP_REST_Request  $request  Request object.
    		 * @since 10.2.0
    		 */
    		return rest_ensure_response( apply_filters( $this->get_hook_prefix() . 'item_response', $response, $item, $request ) );
    	}
    
    	/**
    	 * Get the hook prefix for actions and filters.
    	 *
    	 * Example: woocommerce_rest_api_v4_orders_
    
  • /src/Internal/RestApi/Routes/V4/Orders/Controller.php line 446
    			 * @param boolean $supports_trash Whether the object type support trashing.
    			 * @param WC_Order $order         The object being considered for trashing support.
    			 * @since 10.2.0
    			 */
    			$supports_trash = apply_filters( $this->get_hook_prefix() . 'object_trashable', EMPTY_TRASH_DAYS > 0, $order );
    
    			if ( ! $supports_trash ) {
    				return $this->get_route_error_by_code( self::TRASH_NOT_SUPPORTED );
    			}
    
    			if ( 'trash' === $order->get_status() ) {