WC_Product::get_slug
Get product slug.
Method of the class: WC_Product{}
No Hooks.
Returns
String.
Usage
$WC_Product = new WC_Product(); $WC_Product->get_slug( $context );
- $context(string)
- What the value is for. Valid values are view and edit.
Default:'view'
Changelog
| Since 3.0.0 | Introduced. |
WC_Product::get_slug() WC Product::get slug code WC 10.5.0
public function get_slug( $context = 'view' ) {
return $this->get_prop( 'slug', $context );
}