PluginProbe
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO / 1.4.22
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO v1.4.22
1.4.22 1.4.21 1.4.20 1.4.19 1.4.18 1.4.17 1.4.16 1.4.15 1.4.14 1.4.13 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 1.4.6 1.4.5 1.4.4 1.4.3 1.4.2 1.4.1 1.4.0 1.3.54 1.3.53 All 185 releases
← All changes | app/Attributes/Product.php +4 -4 1.4.14 → 1.4.22 View file →
@@ -462,9 +462,9 @@
462 462 */
463 463 public function date_created() {
464 464 $date_created = $this->product->get_date_created();
465 465
466 - if ( $date_created === null && $this->product->is_type( 'variation' ) ) {
466 + if ( null === $date_created && $this->product->is_type( 'variation' ) ) {
467 467 $date_created = $this->parent->get_date_created();
468 468 }
469 469
470 470 if ( ! ( $date_created instanceof \WC_DateTime ) ) {
@@ -481,9 +481,9 @@
481 481 */
482 482 public function date_updated() {
483 483 $date_created = $this->product->get_date_modified();
484 484
485 - if ( $date_created === null && $this->product->is_type( 'variation' ) ) {
485 + if ( null === $date_created && $this->product->is_type( 'variation' ) ) {
486 486 $date_created = $this->parent->get_date_modified();
487 487 }
488 488
489 489 if ( ! ( $date_created instanceof \WC_DateTime ) ) {
@@ -705,15 +705,15 @@
705 705 public function get_product_meta( $meta = '' ) {
706 706 // Remove the underscore prefix from the meta-key.
707 707 $first = $meta[0];
708 708
709 - if ( $first === '_' ) {
709 + if ( '_' === $first ) {
710 710 $meta = substr( $meta, 1 );
711 711 }
712 712
713 713 $value = $this->product->get_meta( $meta, true );
714 714
715 - if ( $value === '' && $this->product->is_type( 'variation' ) ) {
715 + if ( '' === $value && $this->product->is_type( 'variation' ) ) {
716 716 $value = $this->parent->get_meta( $meta, true );
717 717 }
718 718
719 719 return $value;