: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
'%%order_class%% form.cart .variations td.value span:after',
* Calculates Dropdown's arrow margin values.
* The Dropdown's arrow margin values depend on the actual
* Dropdown margin values.
public function calculate_dropdown_arrow_margin( $value ) {
$dropdown_margin = explode( '|', $value );
$dropdown_bottom_margin = empty( $dropdown_margin[2] ) ? '0px' : $dropdown_margin[2];
$dropdown_left_margin = empty( $dropdown_margin[3] ) ? '0px' : $dropdown_margin[3];
sprintf( 'margin-top: calc( 3px - %s )', $dropdown_bottom_margin ),
sprintf( 'right: calc( 10px - %s )', $dropdown_left_margin ),
// The last declaration wouldn't have the `;`. So appending manually.
return implode( ';', $declarations ) . ';';
* Renders the module output.
* @param array $attrs List of attributes.
* @param string $content Content being processed.
* @param string $render_slug Slug of module that is used for rendering output.
public function render( $attrs, $content = null, $render_slug ) {
$multi_view = et_pb_multi_view_options( $this );
$use_focus_border_color = $this->props['use_focus_border_color'];
if ( 'on' !== $multi_view->get_value( 'show_quantity' ) ) {
$this->add_classname( 'et_pb_hide_input_quantity' );
if ( 'on' !== $multi_view->get_value( 'show_stock' ) ) {
$this->add_classname( 'et_pb_hide_stock' );
if ( 'on' === $use_focus_border_color ) {
$this->add_classname( 'et_pb_with_focus_border' );
ET_Builder_Module_Helper_Woocommerce_Modules::process_background_layout_data( $render_slug, $this );
ET_Builder_Module_Helper_Woocommerce_Modules::process_custom_button_icons( $render_slug, $this );
$this->add_classname( $this->get_text_orientation_classname() );
$this->add_additional_css( $this->props, $render_slug );
add_filter( "et_builder_module_{$render_slug}_outer_wrapper_attrs", array(
$output = self::get_add_to_cart( $this->props );
// Render empty string if no output is generated to avoid unwanted vertical space.
return $this->_render_module_wrapper( $output, $render_slug );
new ET_Builder_Module_Woocommerce_Add_To_Cart();